<?php
//创建目标----创建观察者----注册观察者----目标发表天气

$weather = new \BigVideo\Other\Observer\ConcreteWeatherSubject();

$xiaominglaoma = new \BigVideo\Other\Observer\ConcreteObserver();
$xiaominglaoma->setName("xiaominglaoma");
$xiaominglaoma->setRemindThing("明天是个好日子，去购物");

$xiaohong = new \BigVideo\Other\Observer\ConcreteObserver();
$xiaohong->setName("xiaohong");
$xiaohong->setRemindThing("第一次约会不见散");

$weather->attach($xiaominglaoma);
$weather->attach($xiaohong);

$weather->setWeatherContent("下雪");